﻿using AutoMapper;
using SH.Room.Application.IServices.IRoomNum;
using SH.Room.Application.IServices.IRoomPrice;
using SH.Room.Application.IServices.IRoomType;
using SH.Room.Domain.RoomClass;

namespace SH.Room.Read.API.MapFile
{
    /// <summary>
    /// AutoMapper转换
    /// </summary>
    public class MappingProFiles:Profile
    {
        /// <summary>
        /// AutoMapper类
        /// </summary>
        public MappingProFiles() 
        {
            
            CreateMap<RoomType, RoomTypeDto>().ReverseMap();//房型下拉列表
            
            CreateMap<RoomNumDto,RoomNum>().ReverseMap();//房号添加DTO

            CreateMap<RoomNumUpdDto, RoomNum>().ReverseMap();//房号修改

            CreateMap<RoomTypeAddDto, RoomType>().ReverseMap();//房型添加DTO

            CreateMap<RoomTypeUpdDto, RoomType>().ReverseMap();//房型修改DTO

            CreateMap<RoomPriceAddDto, RoomPrice>().ReverseMap();//房价添加DTO

            CreateMap<RoomPriceUpdDto, RoomPrice>().ReverseMap();//房价修改DTO

        }
    }
}
